package com.incar.chuxing.utils;

public class LocationDoneOnSubscribe{
    /*public class LocationDoneOnSubscribe implements ObservableOnSubscribe<LatLng> {
    final MainActivity activity;

    public LocationDoneOnSubscribe(MainActivity activity) {
        this.activity = activity;
    }


    @Override
    public void subscribe(ObservableEmitter<LatLng> emitter) throws Exception {

        OnInitListener onInitListener = new OnInitListener() {
            @Override
            public void onLocationDone(LatLng latLng) {
                if (!emitter.isDisposed()) {
                    if (latLng == null) {
                        emitter.onError(new Throwable("定位失败"));
                    } else {
                        emitter.onNext(latLng);
                        emitter.onComplete();
                    }

                }
            }

            @Override
            public void onSplashDone(boolean splashDone) {

            }

            @Override
            public void onDrawFenceDone() {

            }

            @Override
            public void onLoadCarFirstPageDone() {

            }
        };

       // activity.setOnInitListener(onInitListener);

    }
*/
}
